package com.nstar.model.orderexpress;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="order_info_exp"
 *     
*/
public class OrderInfoExp implements Serializable {

    /** identifier field */
    private String orderId;

    /** identifier field */
    private String itemSpecId;

    /** identifier field */
    private Integer seq;

    /** nullable persistent field */
    private String newVal;

    /** nullable persistent field */
    private String oldVal;

    /** nullable persistent field */
    private String remarks;

    /** nullable persistent field */
    private com.nstar.model.orderexpress.ItemSpec itemSpec;

    /** nullable persistent field */
    private com.nstar.model.orderexpress.OrderInfo orderInfo;

    /** full constructor */
    public OrderInfoExp(String orderId, String itemSpecId, Integer seq, String newVal, String oldVal, String remarks, com.nstar.model.orderexpress.ItemSpec itemSpec, com.nstar.model.orderexpress.OrderInfo orderInfo) {
        this.orderId = orderId;
        this.itemSpecId = itemSpecId;
        this.seq = seq;
        this.newVal = newVal;
        this.oldVal = oldVal;
        this.remarks = remarks;
        this.itemSpec = itemSpec;
        this.orderInfo = orderInfo;
    }

    /** default constructor */
    public OrderInfoExp() {
    }

    /** minimal constructor */
    public OrderInfoExp(String orderId, String itemSpecId, Integer seq) {
        this.orderId = orderId;
        this.itemSpecId = itemSpecId;
        this.seq = seq;
    }

    /** 
     *                @hibernate.property
     *                 column="ORDER_ID"
     *                 length="15"
     *             
     */
    public String getOrderId() {
        return this.orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    /** 
     *                @hibernate.property
     *                 column="ITEM_SPEC_ID"
     *                 length="10"
     *             
     */
    public String getItemSpecId() {
        return this.itemSpecId;
    }

    public void setItemSpecId(String itemSpecId) {
        this.itemSpecId = itemSpecId;
    }

    /** 
     *                @hibernate.property
     *                 column="SEQ"
     *                 length="4"
     *             
     */
    public Integer getSeq() {
        return this.seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    /** 
     *            @hibernate.property
     *             column="NEW_VAL"
     *             length="255"
     *         
     */
    public String getNewVal() {
        return this.newVal;
    }

    public void setNewVal(String newVal) {
        this.newVal = newVal;
    }

    /** 
     *            @hibernate.property
     *             column="OLD_VAL"
     *             length="255"
     *         
     */
    public String getOldVal() {
        return this.oldVal;
    }

    public void setOldVal(String oldVal) {
        this.oldVal = oldVal;
    }

    /** 
     *            @hibernate.property
     *             column="REMARKS"
     *             length="200"
     *         
     */
    public String getRemarks() {
        return this.remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    /** 
     *            @hibernate.many-to-one
     *             update="false"
     *             insert="false"
     *         
     *            @hibernate.column
     *             name="ITEM_SPEC_ID"
     *         
     */
    public com.nstar.model.orderexpress.ItemSpec getItemSpec() {
        return this.itemSpec;
    }

    public void setItemSpec(com.nstar.model.orderexpress.ItemSpec itemSpec) {
        this.itemSpec = itemSpec;
    }

    /** 
     *            @hibernate.many-to-one
     *             update="false"
     *             insert="false"
     *         
     *            @hibernate.column
     *             name="ORDER_ID"
     *         
     */
    public com.nstar.model.orderexpress.OrderInfo getOrderInfo() {
        return this.orderInfo;
    }

    public void setOrderInfo(com.nstar.model.orderexpress.OrderInfo orderInfo) {
        this.orderInfo = orderInfo;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("orderId", getOrderId())
            .append("itemSpecId", getItemSpecId())
            .append("seq", getSeq())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof OrderInfoExp) ) return false;
        OrderInfoExp castOther = (OrderInfoExp) other;
        return new EqualsBuilder()
            .append(this.getOrderId(), castOther.getOrderId())
            .append(this.getItemSpecId(), castOther.getItemSpecId())
            .append(this.getSeq(), castOther.getSeq())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getOrderId())
            .append(getItemSpecId())
            .append(getSeq())
            .toHashCode();
    }

}
